<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <a href="/toSaveScore">添加</a>
    <table width="800px" border="1px">
        <caption>分数管理</caption>
        <tr>
            <th>编号</th>
            <th>学生</th>
            <th>年龄</th>
            <th>性别</th>
            <th>照片</th>
            <th>课程</th>
            <th>分数</th>
            <th>操作</th>
        </tr>
        <tr th:each="score : ${page.records}">
            <td th:text="${score.id}"></td>
            <td th:text="${score.student.name}"></td>
            <td th:text="${score.student.age}"></td>
            <td th:text="${score.student.gender}"></td>
            <td>
                <img style="width: 40px;height: 40px"
                     th:src="|http://localhost:8080/images/${score.student.image}|">
            </td>
            <td th:text="${score.course}"></td>
            <td th:text="${score.score}"></td>
            <td>
                <a th:href="@{/toUpdateScore(id=${score.id})}">更新</a>
                <a th:href="@{/doDelete(id=${score.id})}">删除</a>
            </td>
        </tr>
    </table>
    <a th:each="i : ${#numbers.sequence(1, page.pages)}"
       th:href="@{findScoresPage(current=${i})}" th:text="${i}"></a>
</body>
</html>
